<template>
  <view pa-20rpx>
    <view bg-white rounded-20rpx>
      <view flex flex-col items-center>
        <image w-133rpx h-120rpx mb-40rpx mt-100rpx src="/static/logo.png"></image>
        <view mb-140rpx text-32rpx>{{ config.name }}</view>
      </view>

      <nut-cell-group>
        <!-- <nut-cell
          title="证照信息"
          @click="$navigateTo('/pages/p?type=LICENSE_INFORMATION')"
          is-link
        ></nut-cell> -->
        <template v-for="item in aboutUsList">
          <nut-cell
            :title="item.title"
            @click="
              $navigateTo(
                item.code === 'LXWM'
                  ? `/pages/mine/contactUs?code=${item.code}&type=about&title=${item.title}`
                  : `/pages/p?code=${item.code}&type=about&title=${item.title}`
              )
            "
            is-link>
            <template #link>
              <image w-16rpx h-30rpx src="/pages/mine/static/right_icon.png"></image>
            </template>
          </nut-cell>
        </template>
      </nut-cell-group>
    </view>

    <view text="#7D7D7D" text-24rpx position-fixed bottom-70rpx w-full flex justify-center>{{ config.copyRight }}</view>
  </view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { getAboutUsList } from '@/api/aboutUs'
import config from '@/config/config'
const aboutUsList = ref<any>([])
function init() {
  getAboutUsList().then((res: any) => {
    aboutUsList.value = res.data.result.records.map((i: any) => {
      return {
        code: i.code,
        title: i.title,
        id: i.id
      }
    })
  })
}

onLoad(async (options: any) => {
  init()
})
</script>
<style>
page {
  --nut-cell-box-shadow: none;
}
</style>
<style scoped></style>
